package com.handinglian.ai.record.mapper;

import com.handinglian.ai.record.dto.CallRecordDto;import com.handinglian.ai.record.entity.CallRecord;
import java.util.Date;import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CallRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CallRecord record);

    int insertOrUpdate(CallRecord record);

    int insertOrUpdateSelective(CallRecord record);

    int insertSelective(CallRecord record);

    CallRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CallRecord record);

    int updateByPrimaryKey(CallRecord record);

    int updateBatch(List<CallRecord> list);

    int batchInsert(@Param("list") List<CallRecord> list);

    List<String> findCallid();

    List<CallRecordDto> list(@Param("callerNo") String callerNo, @Param("calledNo") String calledNo, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("recordStatusList") List<Integer> recordStatusList, @Param("phoneStatusList") List<Integer> phoneStatusList, @Param("sortField") String sortField, @Param("sortOrder") String sortOrder);

    CallRecord findOneByCallid(@Param("callid") String callid);

    Integer countActualNum(@Param("noticeId")Integer noticeId);

    Integer sumCallInDurationTime();

    Integer countCallIn();

    Integer countCallInDaily(@Param("minStartTime")Date minStartTime,@Param("maxStartTime")Date maxStartTime);

    Integer countCallOut();

    Integer countCallOutAnswer();

    Integer countCallInAnswerDateRange(@Param("minStartTime")Date minStartTime,@Param("maxStartTime")Date maxStartTime);
}